package net.csdn.business.common.domain.request.oauth;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;


/**
 * 新增私人accessToken信息对象DTO NewOauthPersonTokenDTO
 * 
 * @author zhangyl
 * @date 2022-12-12
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class NewOauthPersonTokenDTO implements Serializable
{

    private static final long serialVersionUID = 1L;

    /** tokenId */
    @NotBlank(message = "tokenId不能为空")
    private String tokenId;

    /** authenticationId */
    @NotBlank(message = "userId不能为空")
    private String userId;

    /** 用户名 */
    @NotBlank(message = "userName不能为空")
    private String userName;

    private String nickName;

    private String email;

    @NotNull(message = "scope不能为空")
    private Set<String> scope;

    /** token过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date expirTime;

}
